<?php
 if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Class User extends MY_Controller
{
    public function __construct()
    {
        parent::__construct();
        //$this->checkAdmin($this->session->userdata('admin_id'));
        $this->data['controller'] = 'user';         
        $this->load->model('Muser');
    }
    
    public function loginemail()
    {
        die(json_encode($this->Muser->loginUserEmail()));
    }
    
    public function loginmobile()
    {
        die(json_encode($this->Muser->loginUserMobile()));
    }
    
     public function loginfacebook()
    {
        die(json_encode($this->Muser->registerFacebookDB()));   
    }
    
    public function info()
    {
        die(json_encode($this->Muser->infoUser($this->getParamInt('id'))));
    }
    
    public function saveinfo()
    {
        die(json_encode($this->Muser->saveinfoDB()));
    }


    public function changepass()
    {
        die(json_encode($this->Muser->changePassDB()));
    }
    
    public function forgotpass()
    {
        die(json_encode($this->Muser->forGotDB()));
    }
    
    
    public function register()
    {
        die(json_encode($this->Muser->registerUser()));   
    }
    
    public function verifyaccount()
    {
        die(json_encode($this->Muser->verifyaccountDB()));   
    }
    
   
    

}
